using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Viettel.VOFFICE.DAO.Models.Mapping;

namespace Viettel.VOFFICE.DAO.Models
{
    public class VOFFICEContext : DbContext
    {
        static VOFFICEContext()
        {
            Database.SetInitializer<VOFFICEContext>(null);
        }

        public VOFFICEContext()
            : base("Name=VOFFICEContext")
        {
        }

        public VOFFICEContext(string conn)
            : base(conn)
        {
        }

        public DbSet<aspnet_Applications> aspnet_Applications { get; set; }
        public DbSet<aspnet_Membership> aspnet_Membership { get; set; }
        public DbSet<aspnet_Paths> aspnet_Paths { get; set; }
        public DbSet<aspnet_PersonalizationAllUsers> aspnet_PersonalizationAllUsers { get; set; }
        public DbSet<aspnet_PersonalizationPerUser> aspnet_PersonalizationPerUser { get; set; }
        public DbSet<aspnet_Profile> aspnet_Profile { get; set; }
        public DbSet<aspnet_Roles> aspnet_Roles { get; set; }
        public DbSet<aspnet_SchemaVersions> aspnet_SchemaVersions { get; set; }
        public DbSet<aspnet_Users> aspnet_Users { get; set; }
        public DbSet<aspnet_WebEvent_Events> aspnet_WebEvent_Events { get; set; }
        public DbSet<Attachment> Attachments { get; set; }
        public DbSet<Book> Books { get; set; }
        public DbSet<Comment> Comments { get; set; }
        public DbSet<DocumentBook> DocumentBooks { get; set; }
        public DbSet<DocumentInbox> DocumentInboxes { get; set; }
        public DbSet<DocumentOutbox> DocumentOutboxes { get; set; }
        public DbSet<DocumentProgress> DocumentProgresses { get; set; }
        public DbSet<DocumentProperty> DocumentProperties { get; set; }
        public DbSet<DocumentType> DocumentTypes { get; set; }
        public DbSet<Flow> Flows { get; set; }
        public DbSet<Library> Libraries { get; set; }
        public DbSet<MetaData> MetaDatas { get; set; }
        public DbSet<NodeRelation> NodeRelations { get; set; }
        public DbSet<Node> Nodes { get; set; }
        public DbSet<NodeUser> NodeUsers { get; set; }
        public DbSet<Notification> Notifications { get; set; }
        public DbSet<OfficePartner> OfficePartners { get; set; }
        public DbSet<Submission> Submissions { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<Todo> Todos { get; set; }
        public DbSet<TraceFlow> TraceFlows { get; set; }
        public DbSet<UserVoice> UserVoices { get; set; }
        public DbSet<v_Department> v_Department { get; set; }
        public DbSet<v_Position> v_Position { get; set; }
        public DbSet<v_RoleControllerActionMapping> v_RoleControllerActionMapping { get; set; }
        public DbSet<v_SystemFunction> v_SystemFunction { get; set; }
        public DbSet<v_SystemMenu> v_SystemMenu { get; set; }
        public DbSet<v_UserControllerActionMapping> v_UserControllerActionMapping { get; set; }
        public DbSet<v_UsersInDepartment> v_UsersInDepartment { get; set; }
        public DbSet<vw_aspnet_Applications> vw_aspnet_Applications { get; set; }
        public DbSet<vw_aspnet_DepartmentInRoles> vw_aspnet_DepartmentInRoles { get; set; }
        public DbSet<vw_aspnet_MembershipUsers> vw_aspnet_MembershipUsers { get; set; }
        public DbSet<vw_aspnet_Profiles> vw_aspnet_Profiles { get; set; }
        public DbSet<vw_aspnet_Roles> vw_aspnet_Roles { get; set; }
        public DbSet<vw_aspnet_Users> vw_aspnet_Users { get; set; }
        public DbSet<vw_aspnet_UsersInRoles> vw_aspnet_UsersInRoles { get; set; }
        public DbSet<vw_aspnet_WebPartState_Paths> vw_aspnet_WebPartState_Paths { get; set; }
        public DbSet<vw_aspnet_WebPartState_Shared> vw_aspnet_WebPartState_Shared { get; set; }
        public DbSet<vw_aspnet_WebPartState_User> vw_aspnet_WebPartState_User { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new aspnet_ApplicationsMap());
            modelBuilder.Configurations.Add(new aspnet_MembershipMap());
            modelBuilder.Configurations.Add(new aspnet_PathsMap());
            modelBuilder.Configurations.Add(new aspnet_PersonalizationAllUsersMap());
            modelBuilder.Configurations.Add(new aspnet_PersonalizationPerUserMap());
            modelBuilder.Configurations.Add(new aspnet_ProfileMap());
            modelBuilder.Configurations.Add(new aspnet_RolesMap());
            modelBuilder.Configurations.Add(new aspnet_SchemaVersionsMap());
            modelBuilder.Configurations.Add(new aspnet_UsersMap());
            modelBuilder.Configurations.Add(new aspnet_WebEvent_EventsMap());
            modelBuilder.Configurations.Add(new AttachmentMap());
            modelBuilder.Configurations.Add(new BookMap());
            modelBuilder.Configurations.Add(new CommentMap());
            modelBuilder.Configurations.Add(new DocumentBookMap());
            modelBuilder.Configurations.Add(new DocumentInboxMap());
            modelBuilder.Configurations.Add(new DocumentOutboxMap());
            modelBuilder.Configurations.Add(new DocumentProgressMap());
            modelBuilder.Configurations.Add(new DocumentPropertyMap());
            modelBuilder.Configurations.Add(new DocumentTypeMap());
            modelBuilder.Configurations.Add(new FlowMap());
            modelBuilder.Configurations.Add(new LibraryMap());
            modelBuilder.Configurations.Add(new MetaDataMap());
            modelBuilder.Configurations.Add(new NodeRelationMap());
            modelBuilder.Configurations.Add(new NodeMap());
            modelBuilder.Configurations.Add(new NodeUserMap());
            modelBuilder.Configurations.Add(new NotificationMap());
            modelBuilder.Configurations.Add(new OfficePartnerMap());
            modelBuilder.Configurations.Add(new SubmissionMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new TodoMap());
            modelBuilder.Configurations.Add(new TraceFlowMap());
            modelBuilder.Configurations.Add(new UserVoiceMap());
            modelBuilder.Configurations.Add(new v_DepartmentMap());
            modelBuilder.Configurations.Add(new v_PositionMap());
            modelBuilder.Configurations.Add(new v_RoleControllerActionMappingMap());
            modelBuilder.Configurations.Add(new v_SystemFunctionMap());
            modelBuilder.Configurations.Add(new v_SystemMenuMap());
            modelBuilder.Configurations.Add(new v_UserControllerActionMappingMap());
            modelBuilder.Configurations.Add(new v_UsersInDepartmentMap());
            modelBuilder.Configurations.Add(new vw_aspnet_ApplicationsMap());
            modelBuilder.Configurations.Add(new vw_aspnet_DepartmentInRolesMap());
            modelBuilder.Configurations.Add(new vw_aspnet_MembershipUsersMap());
            modelBuilder.Configurations.Add(new vw_aspnet_ProfilesMap());
            modelBuilder.Configurations.Add(new vw_aspnet_RolesMap());
            modelBuilder.Configurations.Add(new vw_aspnet_UsersMap());
            modelBuilder.Configurations.Add(new vw_aspnet_UsersInRolesMap());
            modelBuilder.Configurations.Add(new vw_aspnet_WebPartState_PathsMap());
            modelBuilder.Configurations.Add(new vw_aspnet_WebPartState_SharedMap());
            modelBuilder.Configurations.Add(new vw_aspnet_WebPartState_UserMap());
        }
    }
}
